package main

func main() {

}
func removeDuplicates(nums []int) int {
	i := 0
	j := 1
	for j < len(nums) {
		if nums[j] == nums[j-1] {
			j++
		} else {
			nums[i] = nums[j]
			i++
			j++
		}
	}
	return i + 1
}
